using System.Configuration;

namespace BSDS.Core.Infrastructure.Configuration
{
    public class BsdsConfigurationSection : ConfigurationSection
    {
        [ConfigurationProperty("keyFilename", IsRequired = true)]
        public string KeyFilename
        {
            get { return (string) this["keyFilename"]; }
            set { this["remoteOnly"] = value; }
        }

        [ConfigurationProperty("tempFolder", IsRequired = true)]
        public string TempFolder
        {
            get { return (string) this["tempFolder"]; }
            set { this["tempFolder"] = value; }
        }

        [ConfigurationProperty("deleteTempFilesOnExit", IsRequired = true)]
        public bool DeleteTempFilesOnExit
        {
            get { return (bool) this["deleteTempFilesOnExit"]; }
            set { this["deleteTempFilesOnExit"] = value; }
        }

        [ConfigurationProperty("requireExclusiveFolderAccess", IsRequired = false, DefaultValue=true)]
        public bool RequireExclusiveFolderAccess
        {
            get { return (bool)this["requireExclusiveFolderAccess"]; }
            set { this["requireExclusiveFolderAccess"] = value; }
        }
    }
}